import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-04-16
 * Time: 10:32
 */
public class Demo1_1 {
    public static void main(String[] args) throws IOException {
        File f=new File("hello/rr./text.txt");
        System.out.println(f.getParent());//返回File对象的父目录路径
        System.out.println(f.getName());//返回File的纯文件名称
        System.out.println(f.getPath());//返回File对象的文件路径(pathname)
        System.out.println(f.getAbsolutePath());//绝对路径
        System.out.println(f.getCanonicalPath());//修饰过的绝对路径
    }
}
